home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / less_237.zip / less_237 / configure < prev    next >
Text File  |  1994-09-30  |  44KB  |  1,533 lines

  1. #!/bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf version 1.11 
  4. # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  5.  
  6. # This configure script is free software; you can redistribute it and/or
  7. # modify it under the terms of the GNU General Public License as published
  8. # by the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10.  
  11. # This script is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
  14. # Public License for more details.
  15.  
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. # Save the original args to write them into config.status later.
  21. configure_args="$*"
  22.  
  23. # Only options that might do something get documented.
  24. ac_usage="Usage: configure [options] [host]
  25. Options: [defaults in brackets after descriptions]
  26. --build=BUILD        configure for building on BUILD [BUILD=HOST]
  27. --disable-FEATURE    do not include FEATURE (same as --enable-FEATURE=no)
  28. --enable-FEATURE[=ARG]    include FEATURE [ARG=yes]
  29. --exec-prefix=PREFIX    install host dependent files in PREFIX [/usr/local]
  30. --help            print this message
  31. --host=HOST        configure for HOST [guessed]
  32. --prefix=PREFIX        install host independent files in PREFIX [/usr/local]
  33. --quiet, --silent    do not print \`checking for...' messages
  34. --srcdir=DIR        find the sources in DIR [configure dir or ..]
  35. --target=TARGET        configure for TARGET [TARGET=HOST]
  36. --verbose        print results of checks
  37. --version        print the version of autoconf that created configure
  38. --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  39. --without-PACKAGE    do not use PACKAGE (same as --with-PACKAGE=no)
  40. --x-includes=DIR    X include files are in DIR
  41. --x-libraries=DIR    X library files are in DIR"
  42.  
  43. # Initialize some variables set by options.
  44. # The variables have the same names as the options, with
  45. # dashes changed to underlines.
  46. build=NONE
  47. exec_prefix=
  48. host=NONE
  49. no_create=
  50. nonopt=NONE
  51. norecursion=
  52. prefix=
  53. program_prefix=
  54. program_suffix=
  55. program_transform_name=
  56. silent=
  57. srcdir=
  58. target=NONE
  59. verbose=
  60. x_includes=
  61. x_libraries=
  62.  
  63. ac_prev=
  64. for ac_option
  65. do
  66.  
  67.   # If the previous option needs an argument, assign it.
  68.   if test -n "$ac_prev"; then
  69.     eval "$ac_prev=\$ac_option"
  70.     ac_prev=
  71.     continue
  72.   fi
  73.  
  74.   # Accept (but ignore some of) the important Cygnus configure
  75.   # options, so we can diagnose typos.
  76.  
  77.   case "$ac_option" in
  78.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  79.   *) ac_optarg= ;;
  80.   esac
  81.  
  82.   case "$ac_option" in
  83.  
  84.   -build | --build | --buil | --bui | --bu | --b)
  85.     ac_prev=build ;;
  86.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  87.     build="$ac_optarg" ;;
  88.  
  89.   -disable-* | --disable-*)
  90.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  91.     # Reject names that aren't valid shell variable names.
  92.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  93.       echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  94.     fi
  95.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  96.     eval "enable_${ac_feature}=no" ;;
  97.  
  98.   -enable-* | --enable-*)
  99.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  100.     # Reject names that aren't valid shell variable names.
  101.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  102.       echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  103.     fi
  104.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  105.     case "$ac_option" in
  106.       *=*) ;;
  107.       *) ac_optarg=yes ;;
  108.     esac
  109.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  110.  
  111.   # For backward compatibility, recognize -exec-prefix and --exec_prefix.
  112.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  113.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  114.   | --exec | --exe | --ex)
  115.     ac_prev=exec_prefix ;;
  116.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  117.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  118.   | --exec=* | --exe=* | --ex=*)
  119.     exec_prefix="$ac_optarg" ;;
  120.  
  121.   -gas | --gas | --ga | --g)
  122.     with_gas=yes ;; # Obsolete; use --with-gas.
  123.  
  124.   -help | --help | --hel | --he)
  125.     cat << EOF
  126. $ac_usage
  127. EOF
  128.     exit 0 ;;
  129.  
  130.   -host | --host | --hos | --ho)
  131.     ac_prev=host ;;
  132.   -host=* | --host=* | --hos=* | --ho=*)
  133.     host="$ac_optarg" ;;
  134.  
  135.   -nfp | --nfp | --nf)
  136.     with_fp=no ;; # Obsolete; use --without-fp.
  137.  
  138.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  139.   | --no-cr | --no-c)
  140.     no_create=yes ;;
  141.  
  142.   -norecursion | --norecursion | --norecursio | --norecursi \
  143.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor)
  144.     norecursion=yes ;;
  145.  
  146.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  147.     ac_prev=prefix ;;
  148.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  149.     prefix="$ac_optarg" ;;
  150.  
  151.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  152.   | --program-pre | --program-pr | --program-p)
  153.     ac_prev=program_prefix ;;
  154.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  155.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  156.     program_prefix="$ac_optarg" ;;
  157.  
  158.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  159.   | --program-suf | --program-su | --program-s)
  160.     ac_prev=program_suffix ;;
  161.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  162.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  163.     program_suffix="$ac_optarg" ;;
  164.  
  165.   -program-transform-name | --program-transform-name \
  166.   | --program-transform-nam | --program-transform-na \
  167.   | --program-transform-n | --program-transform- \
  168.   | --program-transform | --program-transfor \
  169.   | --program-transfo | --program-transf \
  170.   | --program-trans | --program-tran \
  171.   | --progr-tra | --program-tr | --program-t)
  172.     ac_prev=program_transform_name ;;
  173.   -program-transform-name=* | --program-transform-name=* \
  174.   | --program-transform-nam=* | --program-transform-na=* \
  175.   | --program-transform-n=* | --program-transform-=* \
  176.   | --program-transform=* | --program-transfor=* \
  177.   | --program-transfo=* | --program-transf=* \
  178.   | --program-trans=* | --program-tran=* \
  179.   | --progr-tra=* | --program-tr=* | --program-t=*)
  180.     program_transform_name="$ac_optarg" ;;
  181.  
  182.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  183.   | -silent | --silent | --silen | --sile | --sil)
  184.     silent=yes ;;
  185.  
  186.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  187.     ac_prev=srcdir ;;
  188.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  189.     srcdir="$ac_optarg" ;;
  190.  
  191.   -target | --target | --targe | --targ | --tar | --ta | --t)
  192.     ac_prev=target ;;
  193.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  194.     target="$ac_optarg" ;;
  195.  
  196.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  197.     verbose=yes ;;
  198.  
  199.   -version | --version | --versio | --versi | --vers)
  200.     echo "configure generated by autoconf version 1.11"
  201.     exit 0 ;;
  202.  
  203.   -with-* | --with-*)
  204.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  205.     # Reject names that aren't valid shell variable names.
  206.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  207.       echo "configure: $ac_package: invalid package name" >&2; exit 1
  208.     fi
  209.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  210.     case "$ac_option" in
  211.       *=*) ;;
  212.       *) ac_optarg=yes ;;
  213.     esac
  214.     eval "with_${ac_package}='$ac_optarg'" ;;
  215.  
  216.   -without-* | --without-*)
  217.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  218.     # Reject names that aren't valid shell variable names.
  219.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  220.       echo "configure: $ac_package: invalid package name" >&2; exit 1
  221.     fi
  222.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  223.     eval "with_${ac_package}=no" ;;
  224.  
  225.   --x) with_x=yes ;; # Obsolete; use --with-x.
  226.  
  227.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  228.   | --x-incl | --x-inc | --x-in | --x-i)
  229.     ac_prev=x_includes ;;
  230.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  231.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  232.     x_includes="$ac_optarg" ;;
  233.  
  234.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  235.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  236.     ac_prev=x_libraries ;;
  237.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  238.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  239.     x_libraries="$ac_optarg" ;;
  240.  
  241.   -*) echo "configure: $ac_option: invalid option; use --help to show usage" >&2; exit 1
  242.     ;;
  243.  
  244.   *) 
  245.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  246.       echo "configure: warning: $ac_option: invalid host type" >&2
  247.     fi
  248.     if test "x$nonopt" != xNONE; then
  249.       echo "configure: can only configure for one host and one target at a time" >&2; exit 1
  250.     fi
  251.     nonopt="$ac_option"
  252.     ;;
  253.  
  254.   esac
  255. done
  256.  
  257. if test -n "$ac_prev"; then
  258.   echo "configure: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" >&2; exit 1
  259. fi
  260.  
  261. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  262. trap 'rm -fr confdefs* $ac_clean_files' 0
  263.  
  264. # Save the original args if we used an alternate arg parser.
  265. ac_configure_temp="${configure_args-$*}"
  266. # Strip out --no-create and --norecursion so they don't pile up.
  267. configure_args=
  268. for ac_arg in $ac_configure_temp; do
  269.   case "$ac_arg" in
  270.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  271.   | --no-cr | --no-c) ;;
  272.   -norecursion | --norecursion | --norecursio | --norecursi \
  273.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;;
  274.   *) configure_args="$configure_args $ac_arg" ;;
  275.   esac
  276. done
  277.  
  278. # NLS nuisances.
  279. # These must not be set unconditionally because not all systems understand
  280. # e.g. LANG=C (notably SCO).
  281. if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi
  282. if test "${LANG+set}"   = 'set'; then LANG=C;   export LANG;   fi
  283.  
  284. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  285. rm -rf conftest* confdefs.h
  286. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  287. echo > confdefs.h
  288.  
  289. # A filename unique to this package, relative to the directory that
  290. # configure is in, which we can look for to find out if srcdir is correct.
  291. ac_unique_file=forwback.c
  292.  
  293. # Find the source files, if location was not specified.
  294. if test -z "$srcdir"; then
  295.   ac_srcdir_defaulted=yes
  296.   # Try the directory containing this script, then `..'.
  297.   ac_prog=$0
  298.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  299.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  300.   srcdir=$ac_confdir
  301.   if test ! -r $srcdir/$ac_unique_file; then
  302.     srcdir=..
  303.   fi
  304. fi
  305. if test ! -r $srcdir/$ac_unique_file; then
  306.   if test x$ac_srcdir_defaulted = xyes; then
  307.     echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1
  308.   else
  309.     echo "configure: can not find sources in ${srcdir}" >&2; exit 1
  310.   fi
  311. fi
  312. ac_ext=c
  313. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  314. ac_cpp='${CPP}'
  315. ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
  316.  
  317.  
  318.  
  319.  
  320. if test -z "$CC"; then
  321.   # Extract the first word of `gcc', so it can be a program name with args.
  322.   set ac_dummy gcc; ac_word=$2
  323.   test -n "$silent" || echo "checking for $ac_word"
  324.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  325.   for ac_dir in $PATH; do
  326.     test -z "$ac_dir" && ac_dir=.
  327.     if test -f $ac_dir/$ac_word; then
  328.       CC="gcc"
  329.       break
  330.     fi
  331.   done
  332.   IFS="$ac_save_ifs"
  333. fi
  334. test -z "$CC" && CC="cc"
  335. test -n "$CC" && test -n "$verbose" && echo "    setting CC to $CC"
  336.  
  337. # Find out if we are using GNU C, under whatever name.
  338. cat > conftest.c <<EOF
  339. #ifdef __GNUC__
  340.   yes
  341. #endif
  342. EOF
  343. ${CC-cc} -E conftest.c > conftest.out 2>&1
  344. if egrep yes conftest.out >/dev/null 2>&1; then
  345.   GCC=1 # For later tests.
  346. fi
  347. rm -f conftest*
  348.  
  349. test -n "$silent" || echo "checking how to run the C preprocessor"
  350. if test -z "$CPP"; then
  351.   # This must be in double quotes, not single quotes, because CPP may get
  352.   # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  353.   # make.  It must be expanded now.
  354.   CPP="${CC-cc} -E"
  355.   cat > conftest.${ac_ext} <<EOF
  356. #include "confdefs.h"
  357. #include <stdio.h>
  358. Syntax Error
  359. EOF
  360. # Some shells (Coherent) do redirections in the wrong order, so need
  361. # the parens.
  362. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  363. if test -z "$ac_err"; then
  364.   :
  365. else
  366.   rm -rf conftest*
  367.   CPP="${CC-cc} -E -traditional-cpp"
  368.   cat > conftest.${ac_ext} <<EOF
  369. #include "confdefs.h"
  370. #include <stdio.h>
  371. Syntax Error
  372. EOF
  373. # Some shells (Coherent) do redirections in the wrong order, so need
  374. # the parens.
  375. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  376. if test -z "$ac_err"; then
  377.   :
  378. else
  379.   rm -rf conftest*
  380.   CPP=/lib/cpp
  381. fi
  382. rm -f conftest*
  383. fi
  384. rm -f conftest*
  385. fi
  386. test -n "$verbose" && echo "    setting CPP to $CPP"
  387.  
  388. if test -n "$GCC"; then
  389.   test -n "$silent" || echo "checking whether -traditional is needed"
  390.   ac_pattern="Autoconf.*'x'"
  391.   ac_prog='#include <sgtty.h>
  392. Autoconf TIOCGETP'
  393.   cat > conftest.${ac_ext} <<EOF
  394. #include "confdefs.h"
  395. $ac_prog
  396. EOF
  397. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  398. if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then
  399.   rm -rf conftest*
  400.   ac_need_trad=1
  401.  
  402. fi
  403. rm -f conftest*
  404.  
  405.  
  406.   if test -z "$ac_need_trad"; then
  407.     ac_prog='#include <termio.h>
  408. Autoconf TCGETA'
  409.     cat > conftest.${ac_ext} <<EOF
  410. #include "confdefs.h"
  411. $ac_prog
  412. EOF
  413. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  414. if egrep "$ac_pattern" conftest.out >/dev/null 2>&1; then
  415.   rm -rf conftest*
  416.   ac_need_trad=1
  417.  
  418. fi
  419. rm -f conftest*
  420.  
  421.   fi
  422.   test -n "$ac_need_trad" && CC="$CC -traditional"
  423. fi
  424.  
  425. # Make sure to not get the incompatible SysV /etc/install and
  426. # /usr/sbin/install, which might be in PATH before a BSD-like install,
  427. # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
  428. # or the AFS install, which mishandles nonexistent args, or
  429. # /usr/ucb/install on SVR4, which tries to use the nonexistent group
  430. # `staff', or /sbin/install on IRIX which has incompatible command-line
  431. # syntax.  Sigh.
  432. #
  433. #     On most BSDish systems install is in /usr/bin, not /usr/ucb
  434. #     anyway.
  435. # This turns out not to be true, so the mere pathname isn't an indication
  436. # of whether the program works.  What we really need is a set of tests for
  437. # the install program to see if it actually works in all the required ways.
  438. #
  439. # Avoid using ./install, which might have been erroneously created
  440. # by make from ./install.sh.
  441. if test -z "${INSTALL}"; then
  442.   test -n "$silent" || echo "checking for a BSD compatible install"
  443.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  444.   for ac_dir in $PATH; do
  445.     case "$ac_dir" in
  446.     ''|.|/etc|/sbin|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
  447.     *)
  448.       # OSF1 and SCO ODT 3.0 have their own names for install.
  449.       for ac_prog in installbsd scoinst install; do
  450.         if test -f $ac_dir/$ac_prog; then
  451.       if test $ac_prog = install &&
  452.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  453.         # AIX install.  It has an incompatible calling convention.
  454.         # OSF/1 installbsd also uses dspmsg, but is usable.
  455.         :
  456.       else
  457.         INSTALL="$ac_dir/$ac_prog -c"
  458.         break 2
  459.       fi
  460.     fi
  461.       done
  462.       ;;
  463.     esac
  464.   done
  465.   IFS="$ac_save_ifs"
  466. fi
  467.  
  468. if test -z "$INSTALL"; then
  469.   # As a last resort, use the slow shell script.
  470.   for ac_dir in ${srcdir} ${srcdir}/.. ${srcdir}/../..; do
  471.     if test -f $ac_dir/install.sh; then
  472.       INSTALL="$ac_dir/install.sh -c"; break
  473.     fi
  474.   done
  475. fi
  476. if test -z "$INSTALL"; then
  477.   echo "configure: can not find install.sh in ${srcdir} or ${srcdir}/.. or ${srcdir}/../.." >&2; exit 1
  478. fi
  479. test -n "$verbose" && echo "    setting INSTALL to $INSTALL"
  480.  
  481. # Use test -z because SunOS4 sh mishandles ${INSTALL_PROGRAM-'${INSTALL}'}.
  482. # It thinks the first close brace ends the variable substitution.
  483. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  484. test -n "$verbose" && echo "    setting INSTALL_PROGRAM to $INSTALL_PROGRAM"
  485.  
  486. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  487. test -n "$verbose" && echo "    setting INSTALL_DATA to $INSTALL_DATA"
  488.  
  489.  
  490. TERMLIBS=
  491. ac_save_LIBS="${LIBS}"
  492. LIBS="${LIBS} -lcurses"
  493. ac_have_lib=""
  494. test -n "$silent" || echo "checking for -lcurses"
  495. cat > conftest.${ac_ext} <<EOF
  496. #include "confdefs.h"
  497.  
  498. int main() { return 0; }
  499. int t() { main();; return 0; }
  500. EOF
  501. if eval $ac_compile; then
  502.   rm -rf conftest*
  503.   ac_have_lib="1"
  504.  
  505. fi
  506. rm -f conftest*
  507. LIBS="${ac_save_LIBS}"
  508. if test -n "${ac_have_lib}"; then
  509.    :; TERMLIBS="$TERMLIBS -lcurses"
  510. else
  511.    :; 
  512. fi
  513.  
  514. ac_save_LIBS="${LIBS}"
  515. LIBS="${LIBS} -ltermcap"
  516. ac_have_lib=""
  517. test -n "$silent" || echo "checking for -ltermcap"
  518. cat > conftest.${ac_ext} <<EOF
  519. #include "confdefs.h"
  520.  
  521. int main() { return 0; }
  522. int t() { main();; return 0; }
  523. EOF
  524. if eval $ac_compile; then
  525.   rm -rf conftest*
  526.   ac_have_lib="1"
  527.  
  528. fi
  529. rm -f conftest*
  530. LIBS="${ac_save_LIBS}"
  531. if test -n "${ac_have_lib}"; then
  532.    :; TERMLIBS="$TERMLIBS -ltermcap"
  533. else
  534.    :; 
  535. fi
  536.  
  537. ac_save_LIBS="${LIBS}"
  538. LIBS="${LIBS} -ltermlib"
  539. ac_have_lib=""
  540. test -n "$silent" || echo "checking for -ltermlib"
  541. cat > conftest.${ac_ext} <<EOF
  542. #include "confdefs.h"
  543.  
  544. int main() { return 0; }
  545. int t() { main();; return 0; }
  546. EOF
  547. if eval $ac_compile; then
  548.   rm -rf conftest*
  549.   ac_have_lib="1"
  550.  
  551. fi
  552. rm -f conftest*
  553. LIBS="${ac_save_LIBS}"
  554. if test -n "${ac_have_lib}"; then
  555.    :; have_termlib=yes
  556. else
  557.    :; have_termlib=no
  558. fi
  559.  
  560. ac_save_LIBS="${LIBS}"
  561. LIBS="${LIBS} -lgen"
  562. ac_have_lib=""
  563. test -n "$silent" || echo "checking for -lgen"
  564. cat > conftest.${ac_ext} <<EOF
  565. #include "confdefs.h"
  566.  
  567. int main() { return 0; }
  568. int t() { main();; return 0; }
  569. EOF
  570. if eval $ac_compile; then
  571.   rm -rf conftest*
  572.   ac_have_lib="1"
  573.  
  574. fi
  575. rm -f conftest*
  576. LIBS="${ac_save_LIBS}"
  577. if test -n "${ac_have_lib}"; then
  578.    :; LIBS="$LIBS -lgen"
  579. else
  580.    :; 
  581. fi
  582.  
  583. ac_save_LIBS="${LIBS}"
  584. LIBS="${LIBS} -lintl"
  585. ac_have_lib=""
  586. test -n "$silent" || echo "checking for -lintl"
  587. cat > conftest.${ac_ext} <<EOF
  588. #include "confdefs.h"
  589.  
  590. int main() { return 0; }
  591. int t() { main();; return 0; }
  592. EOF
  593. if eval $ac_compile; then
  594.   rm -rf conftest*
  595.   ac_have_lib="1"
  596.  
  597. fi
  598. rm -f conftest*
  599. LIBS="${ac_save_LIBS}"
  600. if test -n "${ac_have_lib}"; then
  601.    :; LIBS="$LIBS -lintl"
  602. else
  603.    :; 
  604. fi
  605.  
  606.  
  607. test -n "$silent" || echo "checking termlib"
  608. SAVE_LIBS=$LIBS
  609. LIBS="$LIBS $TERMLIBS"
  610. cat > conftest.${ac_ext} <<EOF
  611. #include "confdefs.h"
  612.  
  613. int main() { return 0; }
  614. int t() { tgetent(0); tgetflag(0); tgetnum(0); tgetstr(0);; return 0; }
  615. EOF
  616. if eval $ac_compile; then
  617.   rm -rf conftest*
  618.   termok=yes
  619.  
  620. else
  621.   rm -rf conftest*
  622.   termok=no
  623. fi
  624. rm -f conftest*
  625.  
  626. if test $termok = no; then
  627.   LIBS="$SAVE_LIBS"
  628.   if test $have_termlib = yes; then
  629.     LIBS="$LIBS -ltermlib"
  630.   fi
  631. fi
  632.  
  633. test -n "$silent" || echo "checking for ANSI C header files"
  634. cat > conftest.${ac_ext} <<EOF
  635. #include "confdefs.h"
  636. #include <stdlib.h>
  637. #include <stdarg.h>
  638. #include <string.h>
  639. #include <float.h>
  640. EOF
  641. # Some shells (Coherent) do redirections in the wrong order, so need
  642. # the parens.
  643. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  644. if test -z "$ac_err"; then
  645.   rm -rf conftest*
  646.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  647. echo '#include "confdefs.h"
  648. #include <string.h>' > conftest.${ac_ext}
  649. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  650. if egrep "memchr" conftest.out >/dev/null 2>&1; then
  651.   rm -rf conftest*
  652.   # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  653. cat > conftest.${ac_ext} <<EOF
  654. #include "confdefs.h"
  655. #include <ctype.h>
  656. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  657. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  658. #define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
  659. int main () { int i; for (i = 0; i < 256; i++)
  660. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  661. exit (0); }
  662.  
  663. EOF
  664. eval $ac_compile
  665. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  666.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  667. echo '#include "confdefs.h"
  668. #include <stdlib.h>' > conftest.${ac_ext}
  669. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  670. if egrep "free" conftest.out >/dev/null 2>&1; then
  671.   rm -rf conftest*
  672.   
  673. {
  674. test -n "$verbose" && \
  675. echo "    defining STDC_HEADERS"
  676. echo "#define" STDC_HEADERS "1" >> confdefs.h
  677. DEFS="$DEFS -DSTDC_HEADERS=1"
  678. ac_sed_defs="${ac_sed_defs}\${ac_dA}STDC_HEADERS\${ac_dB}STDC_HEADERS\${ac_dC}1\${ac_dD}
  679. \${ac_uA}STDC_HEADERS\${ac_uB}STDC_HEADERS\${ac_uC}1\${ac_uD}
  680. \${ac_eA}STDC_HEADERS\${ac_eB}STDC_HEADERS\${ac_eC}1\${ac_eD}
  681. "
  682. }
  683.  
  684.  
  685. fi
  686. rm -f conftest*
  687.  
  688.  
  689. fi
  690. rm -fr conftest*
  691.  
  692. fi
  693. rm -f conftest*
  694.  
  695.  
  696. fi
  697. rm -f conftest*
  698.  
  699. for ac_hdr in ctype.h errno.h fcntl.h stdio.h termcap.h termio.h termios.h time.h unistd.h values.h sys/ioctl.h sys/stream.h sys/ptem.h
  700. do
  701. ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
  702. test -n "$silent" || echo "checking for ${ac_hdr}"
  703. cat > conftest.${ac_ext} <<EOF
  704. #include "confdefs.h"
  705. #include <${ac_hdr}>
  706. EOF
  707. # Some shells (Coherent) do redirections in the wrong order, so need
  708. # the parens.
  709. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  710. if test -z "$ac_err"; then
  711.   rm -rf conftest*
  712.   
  713. {
  714. test -n "$verbose" && \
  715. echo "    defining ${ac_tr_hdr}"
  716. echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
  717. DEFS="$DEFS -D${ac_tr_hdr}=1"
  718. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
  719. \${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
  720. \${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
  721. "
  722. }
  723.  
  724.  
  725. fi
  726. rm -f conftest*
  727. done
  728.  
  729.  
  730. test -n "$silent" || echo "checking for off_t in sys/types.h"
  731. echo '#include "confdefs.h"
  732. #include <sys/types.h>' > conftest.${ac_ext}
  733. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  734. if egrep "off_t" conftest.out >/dev/null 2>&1; then
  735.   :
  736. else
  737.   rm -rf conftest*
  738.   
  739. {
  740. test -n "$verbose" && \
  741. echo "    defining" off_t to be "long"
  742. echo "#define" off_t "long" >> confdefs.h
  743. DEFS="$DEFS -Doff_t=long"
  744. ac_sed_defs="${ac_sed_defs}\${ac_dA}off_t\${ac_dB}off_t\${ac_dC}long\${ac_dD}
  745. \${ac_uA}off_t\${ac_uB}off_t\${ac_uC}long\${ac_uD}
  746. \${ac_eA}off_t\${ac_eB}off_t\${ac_eC}long\${ac_eD}
  747. "
  748. }
  749.  
  750. fi
  751. rm -f conftest*
  752.  
  753. test -n "$silent" || echo "checking for void"
  754. cat > conftest.${ac_ext} <<EOF
  755. #include "confdefs.h"
  756.  
  757. int main() { return 0; }
  758. int t() { void *foo = 0;; return 0; }
  759. EOF
  760. if eval $ac_compile; then
  761.   rm -rf conftest*
  762.   
  763. {
  764. test -n "$verbose" && \
  765. echo "    defining HAVE_VOID"
  766. echo "#define" HAVE_VOID "1" >> confdefs.h
  767. DEFS="$DEFS -DHAVE_VOID=1"
  768. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_VOID\${ac_dB}HAVE_VOID\${ac_dC}1\${ac_dD}
  769. \${ac_uA}HAVE_VOID\${ac_uB}HAVE_VOID\${ac_uC}1\${ac_uD}
  770. \${ac_eA}HAVE_VOID\${ac_eB}HAVE_VOID\${ac_eC}1\${ac_eD}
  771. "
  772. }
  773.  
  774.  
  775. fi
  776. rm -f conftest*
  777.  
  778. test -n "$silent" || echo "checking for time_t"
  779. cat > conftest.${ac_ext} <<EOF
  780. #include "confdefs.h"
  781. #include <time.h>
  782. int main() { return 0; }
  783. int t() { time_t t = 0;; return 0; }
  784. EOF
  785. if eval $ac_compile; then
  786.   rm -rf conftest*
  787.   
  788. {
  789. test -n "$verbose" && \
  790. echo "    defining HAVE_TIME_T"
  791. echo "#define" HAVE_TIME_T "1" >> confdefs.h
  792. DEFS="$DEFS -DHAVE_TIME_T=1"
  793. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TIME_T\${ac_dB}HAVE_TIME_T\${ac_dC}1\${ac_dD}
  794. \${ac_uA}HAVE_TIME_T\${ac_uB}HAVE_TIME_T\${ac_uC}1\${ac_uD}
  795. \${ac_eA}HAVE_TIME_T\${ac_eB}HAVE_TIME_T\${ac_eC}1\${ac_eD}
  796. "
  797. }
  798.  
  799.  
  800. fi
  801. rm -f conftest*
  802.  
  803.  
  804. test -n "$silent" || echo "checking for return type of signal handlers"
  805. cat > conftest.${ac_ext} <<EOF
  806. #include "confdefs.h"
  807. #include <sys/types.h>
  808. #include <signal.h>
  809. #ifdef signal
  810. #undef signal
  811. #endif
  812. extern void (*signal ()) ();
  813. int main() { return 0; }
  814. int t() { int i;; return 0; }
  815. EOF
  816. if eval $ac_compile; then
  817.   rm -rf conftest*
  818.   
  819. {
  820. test -n "$verbose" && \
  821. echo "    defining" RETSIGTYPE to be "void"
  822. echo "#define" RETSIGTYPE "void" >> confdefs.h
  823. DEFS="$DEFS -DRETSIGTYPE=void"
  824. ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}void\${ac_dD}
  825. \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}void\${ac_uD}
  826. \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}void\${ac_eD}
  827. "
  828. }
  829.  
  830.  
  831. else
  832.   rm -rf conftest*
  833.   
  834. {
  835. test -n "$verbose" && \
  836. echo "    defining" RETSIGTYPE to be "int"
  837. echo "#define" RETSIGTYPE "int" >> confdefs.h
  838. DEFS="$DEFS -DRETSIGTYPE=int"
  839. ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}int\${ac_dD}
  840. \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}int\${ac_uD}
  841. \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}int\${ac_eD}
  842. "
  843. }
  844.  
  845. fi
  846. rm -f conftest*
  847.  
  848.  
  849. for ac_func in _setjmp system sigsetmask memcpy strchr
  850. do
  851. ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  852. test -n "$silent" || echo "checking for ${ac_func}"
  853. cat > conftest.${ac_ext} <<EOF
  854. #include "confdefs.h"
  855. #include <ctype.h>
  856. int main() { return 0; }
  857. int t() { 
  858. /* The GNU C library defines this for functions which it implements
  859.     to always fail with ENOSYS.  Some functions are actually named
  860.     something starting with __ and the normal name is an alias.  */
  861. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  862. choke me
  863. #else
  864. /* Override any gcc2 internal prototype to avoid an error.  */
  865. extern char ${ac_func}(); ${ac_func}();
  866. #endif
  867. ; return 0; }
  868. EOF
  869. if eval $ac_compile; then
  870.   rm -rf conftest*
  871.   {
  872. test -n "$verbose" && \
  873. echo "    defining ${ac_tr_func}"
  874. echo "#define" ${ac_tr_func} "1" >> confdefs.h
  875. DEFS="$DEFS -D${ac_tr_func}=1"
  876. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
  877. \${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
  878. \${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
  879. "
  880. }
  881.  
  882.  
  883. fi
  884. rm -f conftest*
  885. done
  886.  
  887. test -n "$silent" || echo "checking for tcgetattr"
  888. cat > conftest.${ac_ext} <<EOF
  889. #include "confdefs.h"
  890. #include <ctype.h>
  891. int main() { return 0; }
  892. int t() { 
  893. /* The GNU C library defines this for functions which it implements
  894.     to always fail with ENOSYS.  Some functions are actually named
  895.     something starting with __ and the normal name is an alias.  */
  896. #if defined (__stub_tcgetattr) || defined (__stub___tcgetattr)
  897. choke me
  898. #else
  899. /* Override any gcc2 internal prototype to avoid an error.  */
  900. extern char tcgetattr(); tcgetattr();
  901. #endif
  902. ; return 0; }
  903. EOF
  904. if eval $ac_compile; then
  905.   rm -rf conftest*
  906.   {
  907. test -n "$verbose" && \
  908. echo "    defining HAVE_TERMIOS_FUNCS"
  909. echo "#define" HAVE_TERMIOS_FUNCS "1" >> confdefs.h
  910. DEFS="$DEFS -DHAVE_TERMIOS_FUNCS=1"
  911. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TERMIOS_FUNCS\${ac_dB}HAVE_TERMIOS_FUNCS\${ac_dC}1\${ac_dD}
  912. \${ac_uA}HAVE_TERMIOS_FUNCS\${ac_uB}HAVE_TERMIOS_FUNCS\${ac_uC}1\${ac_uD}
  913. \${ac_eA}HAVE_TERMIOS_FUNCS\${ac_eB}HAVE_TERMIOS_FUNCS\${ac_eC}1\${ac_eD}
  914. "
  915. }
  916.  
  917.  
  918. fi
  919. rm -f conftest*
  920.  
  921. test -n "$silent" || echo "checking for strerror"
  922. cat > conftest.${ac_ext} <<EOF
  923. #include "confdefs.h"
  924.  
  925. #if HAVE_STDIO_H
  926. #include <stdio.h>
  927. #endif
  928. #if HAVE_STRING_H
  929. #include <string.h>
  930. #endif
  931. #if HAVE_ERRNO_H
  932. #include <errno.h>
  933. #endif
  934. int main() { return 0; }
  935. int t() { static char *x; x = strerror(0);; return 0; }
  936. EOF
  937. if eval $ac_compile; then
  938.   rm -rf conftest*
  939.   
  940. {
  941. test -n "$verbose" && \
  942. echo "    defining HAVE_STRERROR"
  943. echo "#define" HAVE_STRERROR "1" >> confdefs.h
  944. DEFS="$DEFS -DHAVE_STRERROR=1"
  945. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_STRERROR\${ac_dB}HAVE_STRERROR\${ac_dC}1\${ac_dD}
  946. \${ac_uA}HAVE_STRERROR\${ac_uB}HAVE_STRERROR\${ac_uC}1\${ac_uD}
  947. \${ac_eA}HAVE_STRERROR\${ac_eB}HAVE_STRERROR\${ac_eC}1\${ac_eD}
  948. "
  949. }
  950.  
  951.  
  952. fi
  953. rm -f conftest*
  954.  
  955. cat > conftest.${ac_ext} <<EOF
  956. #include "confdefs.h"
  957.  
  958. int main() { return 0; }
  959. int t() { extern int sys_errlist; static int x; x = sys_errlist;; return 0; }
  960. EOF
  961. if eval $ac_compile; then
  962.   rm -rf conftest*
  963.   
  964. {
  965. test -n "$verbose" && \
  966. echo "    defining HAVE_SYS_ERRLIST"
  967. echo "#define" HAVE_SYS_ERRLIST "1" >> confdefs.h
  968. DEFS="$DEFS -DHAVE_SYS_ERRLIST=1"
  969. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_SYS_ERRLIST\${ac_dB}HAVE_SYS_ERRLIST\${ac_dC}1\${ac_dD}
  970. \${ac_uA}HAVE_SYS_ERRLIST\${ac_uB}HAVE_SYS_ERRLIST\${ac_uC}1\${ac_uD}
  971. \${ac_eA}HAVE_SYS_ERRLIST\${ac_eB}HAVE_SYS_ERRLIST\${ac_eC}1\${ac_eD}
  972. "
  973. }
  974.  
  975.  
  976. fi
  977. rm -f conftest*
  978.  
  979. cat > conftest.${ac_ext} <<EOF
  980. #include "confdefs.h"
  981.  
  982. int main() { return 0; }
  983. int t() { extern int errno; static int x; x = errno;; return 0; }
  984. EOF
  985. if eval $ac_compile; then
  986.   rm -rf conftest*
  987.   
  988. {
  989. test -n "$verbose" && \
  990. echo "    defining HAVE_ERRNO"
  991. echo "#define" HAVE_ERRNO "1" >> confdefs.h
  992. DEFS="$DEFS -DHAVE_ERRNO=1"
  993. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ERRNO\${ac_dB}HAVE_ERRNO\${ac_dC}1\${ac_dD}
  994. \${ac_uA}HAVE_ERRNO\${ac_uB}HAVE_ERRNO\${ac_uC}1\${ac_uD}
  995. \${ac_eA}HAVE_ERRNO\${ac_eB}HAVE_ERRNO\${ac_eC}1\${ac_eD}
  996. "
  997. }
  998.  
  999.  
  1000. fi
  1001. rm -f conftest*
  1002.  
  1003. test -n "$silent" || echo "checking for locale"
  1004. cat > conftest.${ac_ext} <<EOF
  1005. #include "confdefs.h"
  1006. #include <locale.h>
  1007. #include <ctype.h>
  1008. int main() { return 0; }
  1009. int t() { setlocale(LC_CTYPE,""); isprint(0); iscntrl(0);; return 0; }
  1010. EOF
  1011. if eval $ac_compile; then
  1012.   rm -rf conftest*
  1013.   
  1014. {
  1015. test -n "$verbose" && \
  1016. echo "    defining HAVE_LOCALE"
  1017. echo "#define" HAVE_LOCALE "1" >> confdefs.h
  1018. DEFS="$DEFS -DHAVE_LOCALE=1"
  1019. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LOCALE\${ac_dB}HAVE_LOCALE\${ac_dC}1\${ac_dD}
  1020. \${ac_uA}HAVE_LOCALE\${ac_uB}HAVE_LOCALE\${ac_uC}1\${ac_uD}
  1021. \${ac_eA}HAVE_LOCALE\${ac_eB}HAVE_LOCALE\${ac_eC}1\${ac_eD}
  1022. "
  1023. }
  1024.  
  1025.  
  1026. fi
  1027. rm -f conftest*
  1028.  
  1029. test -n "$silent" || echo "checking for ctype"
  1030. cat > conftest.${ac_ext} <<EOF
  1031. #include "confdefs.h"
  1032.  
  1033. #if HAVE_CTYPE_H
  1034. #include <ctype.h>
  1035. #endif
  1036. int main() { return 0; }
  1037. int t() { static int x; x = isupper(x); x = tolower(x); x = toupper(x);; return 0; }
  1038. EOF
  1039. if eval $ac_compile; then
  1040.   rm -rf conftest*
  1041.   
  1042. {
  1043. test -n "$verbose" && \
  1044. echo "    defining HAVE_UPPER_LOWER"
  1045. echo "#define" HAVE_UPPER_LOWER "1" >> confdefs.h
  1046. DEFS="$DEFS -DHAVE_UPPER_LOWER=1"
  1047. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_UPPER_LOWER\${ac_dB}HAVE_UPPER_LOWER\${ac_dC}1\${ac_dD}
  1048. \${ac_uA}HAVE_UPPER_LOWER\${ac_uB}HAVE_UPPER_LOWER\${ac_uC}1\${ac_uD}
  1049. \${ac_eA}HAVE_UPPER_LOWER\${ac_eB}HAVE_UPPER_LOWER\${ac_eC}1\${ac_eD}
  1050. "
  1051. }
  1052.  
  1053.  
  1054. fi
  1055. rm -f conftest*
  1056.  
  1057.  
  1058. have_ospeed=no
  1059. test -n "$silent" || echo "checking termcap for ospeed"
  1060. cat > conftest.${ac_ext} <<EOF
  1061. #include "confdefs.h"
  1062.  
  1063. #include <sys/types.h>
  1064. #if HAVE_TERMIOS_H
  1065. #include <termios.h>
  1066. #endif
  1067. #if HAVE_TERMCAP_H
  1068. #include <termcap.h>
  1069. #endif
  1070. int main() { return 0; }
  1071. int t() { ospeed = 0;; return 0; }
  1072. EOF
  1073. if eval $ac_compile; then
  1074.   rm -rf conftest*
  1075.   
  1076. {
  1077. test -n "$verbose" && \
  1078. echo "    defining HAVE_OSPEED"
  1079. echo "#define" HAVE_OSPEED "1" >> confdefs.h
  1080. DEFS="$DEFS -DHAVE_OSPEED=1"
  1081. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_OSPEED\${ac_dB}HAVE_OSPEED\${ac_dC}1\${ac_dD}
  1082. \${ac_uA}HAVE_OSPEED\${ac_uB}HAVE_OSPEED\${ac_uC}1\${ac_uD}
  1083. \${ac_eA}HAVE_OSPEED\${ac_eB}HAVE_OSPEED\${ac_eC}1\${ac_eD}
  1084. "
  1085. }
  1086.  have_ospeed=yes
  1087.  
  1088. fi
  1089. rm -f conftest*
  1090.  
  1091. if test $have_ospeed = no; then
  1092. cat > conftest.${ac_ext} <<EOF
  1093. #include "confdefs.h"
  1094.  
  1095. int main() { return 0; }
  1096. int t() { extern short ospeed; ospeed = 0;; return 0; }
  1097. EOF
  1098. if eval $ac_compile; then
  1099.   rm -rf conftest*
  1100.   
  1101. {
  1102. test -n "$verbose" && \
  1103. echo "    defining HAVE_OSPEED"
  1104. echo "#define" HAVE_OSPEED "1" >> confdefs.h
  1105. DEFS="$DEFS -DHAVE_OSPEED=1"
  1106. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_OSPEED\${ac_dB}HAVE_OSPEED\${ac_dC}1\${ac_dD}
  1107. \${ac_uA}HAVE_OSPEED\${ac_uB}HAVE_OSPEED\${ac_uC}1\${ac_uD}
  1108. \${ac_eA}HAVE_OSPEED\${ac_eB}HAVE_OSPEED\${ac_eC}1\${ac_eD}
  1109. "
  1110. }
  1111.  
  1112. {
  1113. test -n "$verbose" && \
  1114. echo "    defining MUST_DEFINE_OSPEED"
  1115. echo "#define" MUST_DEFINE_OSPEED "1" >> confdefs.h
  1116. DEFS="$DEFS -DMUST_DEFINE_OSPEED=1"
  1117. ac_sed_defs="${ac_sed_defs}\${ac_dA}MUST_DEFINE_OSPEED\${ac_dB}MUST_DEFINE_OSPEED\${ac_dC}1\${ac_dD}
  1118. \${ac_uA}MUST_DEFINE_OSPEED\${ac_uB}MUST_DEFINE_OSPEED\${ac_uC}1\${ac_uD}
  1119. \${ac_eA}MUST_DEFINE_OSPEED\${ac_eB}MUST_DEFINE_OSPEED\${ac_eC}1\${ac_eD}
  1120. "
  1121. }
  1122.  
  1123.  
  1124. fi
  1125. rm -f conftest*
  1126.  
  1127. fi
  1128.  
  1129.  
  1130. have_regex=no
  1131. test -n "$silent" || echo "checking for POSIX regex.h"
  1132. cat > conftest.${ac_ext} <<EOF
  1133. #include "confdefs.h"
  1134. #include <sys/types.h>
  1135. #include <regex.h>
  1136. int main() { return 0; }
  1137. int t() { regex_t *r; regfree(r);; return 0; }
  1138. EOF
  1139. if eval $ac_compile; then
  1140.   rm -rf conftest*
  1141.   
  1142. {
  1143. test -n "$verbose" && \
  1144. echo "    defining HAVE_POSIX_REGCOMP"
  1145. echo "#define" HAVE_POSIX_REGCOMP "1" >> confdefs.h
  1146. DEFS="$DEFS -DHAVE_POSIX_REGCOMP=1"
  1147. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_POSIX_REGCOMP\${ac_dB}HAVE_POSIX_REGCOMP\${ac_dC}1\${ac_dD}
  1148. \${ac_uA}HAVE_POSIX_REGCOMP\${ac_uB}HAVE_POSIX_REGCOMP\${ac_uC}1\${ac_uD}
  1149. \${ac_eA}HAVE_POSIX_REGCOMP\${ac_eB}HAVE_POSIX_REGCOMP\${ac_eC}1\${ac_eD}
  1150. "
  1151. }
  1152.  have_regex=yes
  1153.  
  1154. fi
  1155. rm -f conftest*
  1156.  
  1157. if test $have_regex = no; then
  1158. test -n "$silent" || echo "checking for regcmp"
  1159. cat > conftest.${ac_ext} <<EOF
  1160. #include "confdefs.h"
  1161. #include <ctype.h>
  1162. int main() { return 0; }
  1163. int t() { 
  1164. /* The GNU C library defines this for functions which it implements
  1165.     to always fail with ENOSYS.  Some functions are actually named
  1166.     something starting with __ and the normal name is an alias.  */
  1167. #if defined (__stub_regcmp) || defined (__stub___regcmp)
  1168. choke me
  1169. #else
  1170. /* Override any gcc2 internal prototype to avoid an error.  */
  1171. extern char regcmp(); regcmp();
  1172. #endif
  1173. ; return 0; }
  1174. EOF
  1175. if eval $ac_compile; then
  1176.   rm -rf conftest*
  1177.   {
  1178. test -n "$verbose" && \
  1179. echo "    defining HAVE_REGCMP"
  1180. echo "#define" HAVE_REGCMP "1" >> confdefs.h
  1181. DEFS="$DEFS -DHAVE_REGCMP=1"
  1182. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_REGCMP\${ac_dB}HAVE_REGCMP\${ac_dC}1\${ac_dD}
  1183. \${ac_uA}HAVE_REGCMP\${ac_uB}HAVE_REGCMP\${ac_uC}1\${ac_uD}
  1184. \${ac_eA}HAVE_REGCMP\${ac_eB}HAVE_REGCMP\${ac_eC}1\${ac_eD}
  1185. "
  1186. }
  1187.  have_regex=yes
  1188.  
  1189. fi
  1190. rm -f conftest*
  1191.  
  1192. fi
  1193. if test $have_regex = no; then
  1194. cat > conftest.${ac_ext} <<EOF
  1195. #include "confdefs.h"
  1196. #include "regexp.h"
  1197. int main() { return 0; }
  1198. int t() { regcomp("");; return 0; }
  1199. EOF
  1200. if eval $ac_compile; then
  1201.   rm -rf conftest*
  1202.   
  1203. {
  1204. test -n "$verbose" && \
  1205. echo "    defining HAVE_V8_REGCOMP"
  1206. echo "#define" HAVE_V8_REGCOMP "1" >> confdefs.h
  1207. DEFS="$DEFS -DHAVE_V8_REGCOMP=1"
  1208. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_V8_REGCOMP\${ac_dB}HAVE_V8_REGCOMP\${ac_dC}1\${ac_dD}
  1209. \${ac_uA}HAVE_V8_REGCOMP\${ac_uB}HAVE_V8_REGCOMP\${ac_uC}1\${ac_uD}
  1210. \${ac_eA}HAVE_V8_REGCOMP\${ac_eB}HAVE_V8_REGCOMP\${ac_eC}1\${ac_eD}
  1211. "
  1212. }
  1213.  have_regex=yes
  1214.  
  1215. fi
  1216. rm -f conftest*
  1217.  
  1218. fi
  1219. if test $have_regex = no && test -f ${srcdir}/regex.c; then
  1220.  
  1221. {
  1222. test -n "$verbose" && \
  1223. echo "    defining HAVE_POSIX_REGCOMP"
  1224. echo "#define" HAVE_POSIX_REGCOMP "1" >> confdefs.h
  1225. DEFS="$DEFS -DHAVE_POSIX_REGCOMP=1"
  1226. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_POSIX_REGCOMP\${ac_dB}HAVE_POSIX_REGCOMP\${ac_dC}1\${ac_dD}
  1227. \${ac_uA}HAVE_POSIX_REGCOMP\${ac_uB}HAVE_POSIX_REGCOMP\${ac_uC}1\${ac_uD}
  1228. \${ac_eA}HAVE_POSIX_REGCOMP\${ac_eB}HAVE_POSIX_REGCOMP\${ac_eC}1\${ac_eD}
  1229. "
  1230. }
  1231.  REGEX_O='regex.$(O)'  have_regex=yes
  1232. fi
  1233. if test $have_regex = no && test -f ${srcdir}/regexp.c; then
  1234.  
  1235. {
  1236. test -n "$verbose" && \
  1237. echo "    defining HAVE_V8_REGCOMP"
  1238. echo "#define" HAVE_V8_REGCOMP "1" >> confdefs.h
  1239. DEFS="$DEFS -DHAVE_V8_REGCOMP=1"
  1240. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_V8_REGCOMP\${ac_dB}HAVE_V8_REGCOMP\${ac_dC}1\${ac_dD}
  1241. \${ac_uA}HAVE_V8_REGCOMP\${ac_uB}HAVE_V8_REGCOMP\${ac_uC}1\${ac_uD}
  1242. \${ac_eA}HAVE_V8_REGCOMP\${ac_eB}HAVE_V8_REGCOMP\${ac_eC}1\${ac_eD}
  1243. "
  1244. }
  1245.  REGEX_O='regexp.$(O)'  have_regex=yes
  1246. fi
  1247. if test $have_regex = no; then
  1248. test -n "$silent" || echo "checking for re_comp"
  1249. cat > conftest.${ac_ext} <<EOF
  1250. #include "confdefs.h"
  1251. #include <ctype.h>
  1252. int main() { return 0; }
  1253. int t() { 
  1254. /* The GNU C library defines this for functions which it implements
  1255.     to always fail with ENOSYS.  Some functions are actually named
  1256.     something starting with __ and the normal name is an alias.  */
  1257. #if defined (__stub_re_comp) || defined (__stub___re_comp)
  1258. choke me
  1259. #else
  1260. /* Override any gcc2 internal prototype to avoid an error.  */
  1261. extern char re_comp(); re_comp();
  1262. #endif
  1263. ; return 0; }
  1264. EOF
  1265. if eval $ac_compile; then
  1266.   rm -rf conftest*
  1267.   {
  1268. test -n "$verbose" && \
  1269. echo "    defining HAVE_RE_COMP"
  1270. echo "#define" HAVE_RE_COMP "1" >> confdefs.h
  1271. DEFS="$DEFS -DHAVE_RE_COMP=1"
  1272. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_RE_COMP\${ac_dB}HAVE_RE_COMP\${ac_dC}1\${ac_dD}
  1273. \${ac_uA}HAVE_RE_COMP\${ac_uB}HAVE_RE_COMP\${ac_uC}1\${ac_uD}
  1274. \${ac_eA}HAVE_RE_COMP\${ac_eB}HAVE_RE_COMP\${ac_eC}1\${ac_eD}
  1275. "
  1276. }
  1277.  have_regex=yes
  1278.  
  1279. fi
  1280. rm -f conftest*
  1281.  
  1282. fi
  1283. if test $have_regex = no; then
  1284.  
  1285. {
  1286. test -n "$verbose" && \
  1287. echo "    defining NO_REGEX"
  1288. echo "#define" NO_REGEX "1" >> confdefs.h
  1289. DEFS="$DEFS -DNO_REGEX=1"
  1290. ac_sed_defs="${ac_sed_defs}\${ac_dA}NO_REGEX\${ac_dB}NO_REGEX\${ac_dC}1\${ac_dD}
  1291. \${ac_uA}NO_REGEX\${ac_uB}NO_REGEX\${ac_uC}1\${ac_uD}
  1292. \${ac_eA}NO_REGEX\${ac_eB}NO_REGEX\${ac_eC}1\${ac_eD}
  1293. "
  1294. }
  1295.  
  1296. fi
  1297.  
  1298.  
  1299. # The preferred way to propogate these variables is regular @ substitutions.
  1300. if test -n "$prefix"; then
  1301.   ac_prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  1302. else
  1303.   prefix=/usr/local
  1304. fi
  1305. if test -n "$exec_prefix"; then
  1306.   ac_prsub="$ac_prsub
  1307. s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
  1308. else
  1309.   exec_prefix='${prefix}' # Let make expand it.
  1310. fi
  1311.  
  1312. # Any assignment to VPATH causes Sun make to only execute
  1313. # the first set of double-colon rules, so remove it if not needed.
  1314. # If there is a colon in the path, we need to keep it.
  1315. if test "x$srcdir" = x.; then
  1316.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1317. fi
  1318.  
  1319. # Quote sed substitution magic chars in DEFS.
  1320. cat >conftest.def <<EOF
  1321. $DEFS
  1322. EOF
  1323. ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
  1324. DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
  1325. rm -f conftest.def
  1326. # Substitute for predefined variables.
  1327.  
  1328. trap 'rm -f config.status; exit 1' 1 2 15
  1329. echo creating config.status
  1330. rm -f config.status
  1331. cat > config.status <<EOF
  1332. #!/bin/sh
  1333. # Generated automatically by configure.
  1334. # Run this file to recreate the current configuration.
  1335. # This directory was configured as follows,
  1336. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1337. #
  1338. # $0 $configure_args
  1339.  
  1340. ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
  1341. for ac_option
  1342. do
  1343.   case "\$ac_option" in
  1344.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1345.     echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create
  1346.     exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
  1347.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1348.     echo "config.status generated by autoconf version 1.11"
  1349.     exit 0 ;;
  1350.   -help | --help | --hel | --he | --h)
  1351.     echo "\$ac_cs_usage"; exit 0 ;;
  1352.   *) echo "\$ac_cs_usage"; exit 1 ;;
  1353.   esac
  1354. done
  1355.  
  1356. trap 'rm -fr Makefile defines.h conftest*; exit 1' 1 2 15
  1357. CC='$CC'
  1358. CPP='$CPP'
  1359. INSTALL='$INSTALL'
  1360. INSTALL_PROGRAM='$INSTALL_PROGRAM'
  1361. INSTALL_DATA='$INSTALL_DATA'
  1362. REGEX_O='$REGEX_O'
  1363. LIBS='$LIBS'
  1364. srcdir='$srcdir'
  1365. top_srcdir='$top_srcdir'
  1366. prefix='$prefix'
  1367. exec_prefix='$exec_prefix'
  1368. ac_prsub='$ac_prsub'
  1369. ac_vpsub='$ac_vpsub'
  1370. extrasub='$extrasub'
  1371. EOF
  1372. cat >> config.status <<\EOF
  1373.  
  1374. ac_given_srcdir=$srcdir
  1375.  
  1376. CONFIG_FILES=${CONFIG_FILES-"Makefile"}
  1377. for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
  1378.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1379.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1380.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1381.     # The file is in a subdirectory.
  1382.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1383.     ac_dir_suffix="/$ac_dir"
  1384.   else
  1385.     ac_dir_suffix=
  1386.   fi
  1387.  
  1388.   # A "../" for each directory in $ac_dir_suffix.
  1389.   ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1390.   case "$ac_given_srcdir" in
  1391.   .)  srcdir=.
  1392.       if test -z "$ac_dir_suffix"; then top_srcdir=.
  1393.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  1394.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1395.   *) # Relative path.
  1396.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1397.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1398.   esac
  1399.  
  1400.   echo creating "$ac_file"
  1401.   rm -f "$ac_file"
  1402.   comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure."
  1403.   case "$ac_file" in
  1404.     *.c | *.h | *.C | *.cc | *.m )  echo "/* $comment_str */" > "$ac_file" ;;
  1405.     * )          echo "# $comment_str"     > "$ac_file" ;;
  1406.   esac
  1407.   sed -e "
  1408. $ac_prsub
  1409. $ac_vpsub
  1410. $extrasub
  1411. s%@CC@%$CC%g
  1412. s%@CPP@%$CPP%g
  1413. s%@INSTALL@%$INSTALL%g
  1414. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1415. s%@INSTALL_DATA@%$INSTALL_DATA%g
  1416. s%@REGEX_O@%$REGEX_O%g
  1417. s%@LIBS@%$LIBS%g
  1418. s%@srcdir@%$srcdir%g
  1419. s%@top_srcdir@%$top_srcdir%g
  1420. s%@prefix@%$prefix%g
  1421. s%@exec_prefix@%$exec_prefix%g
  1422. s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file
  1423. fi; done
  1424.  
  1425. # These sed commands are put into ac_sed_defs when defining a macro.
  1426. # They are broken into pieces to make the sed script easier to manage.
  1427. # They are passed to sed as "A NAME B NAME C VALUE D", where NAME
  1428. # is the cpp macro being defined and VALUE is the value it is being given.
  1429. # Each defining turns into a single global substitution command.
  1430. # Hopefully no one uses "!" as a variable value.
  1431. # Other candidates for the sed separators, like , and @, do get used.
  1432. #
  1433. # ac_d sets the value in "#define NAME VALUE" lines.
  1434. ac_dA='s!^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  1435. ac_dB='\([     ][     ]*\)[^     ]*!\1#\2'
  1436. ac_dC='\3'
  1437. ac_dD='!g'
  1438. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  1439. ac_uA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1440. ac_uB='\([     ]\)!\1#\2define\3'
  1441. ac_uC=' '
  1442. ac_uD='\4!g'
  1443. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  1444. ac_eA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1445. ac_eB='$!\1#\2define\3'
  1446. ac_eC=' '
  1447. ac_eD='!g'
  1448. rm -f conftest.sed
  1449. EOF
  1450. # Turn off quoting long enough to insert the sed commands.
  1451. rm -f conftest.sh
  1452. cat > conftest.sh <<EOF
  1453. $ac_sed_defs
  1454. EOF
  1455.  
  1456. # Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
  1457. # on the size of here documents.
  1458.  
  1459. # Maximum number of lines to put in a single here document.
  1460. ac_max_sh_lines=9
  1461.  
  1462. while :
  1463. do
  1464.   # wc gives bogus results for an empty file on some AIX systems.
  1465.   ac_lines=`grep -c . conftest.sh`
  1466.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1467.   rm -f conftest.s1 conftest.s2
  1468.   sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -9.
  1469.   sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +10.
  1470.   # Write a limited-size here document to append to conftest.sed.
  1471.   echo 'cat >> conftest.sed <<CONFEOF' >> config.status
  1472.   cat conftest.s1 >> config.status
  1473.   echo 'CONFEOF' >> config.status
  1474.   rm -f conftest.s1 conftest.sh
  1475.   mv conftest.s2 conftest.sh
  1476. done
  1477. rm -f conftest.sh
  1478.  
  1479. # Now back to your regularly scheduled config.status.
  1480. cat >> config.status <<\EOF
  1481. # This sed command replaces #undef's with comments.  This is necessary, for
  1482. # example, in the case of _POSIX_SOURCE, which is predefined and required
  1483. # on some systems where configure will not decide to define it in
  1484. # defines.h.
  1485. cat >> conftest.sed <<\CONFEOF
  1486. s,^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
  1487. CONFEOF
  1488. rm -f conftest.h
  1489. # Break up the sed commands because old seds have small limits.
  1490. ac_max_sed_lines=20
  1491.  
  1492. CONFIG_HEADERS=${CONFIG_HEADERS-"defines.h"}
  1493. for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
  1494.   echo creating $ac_file
  1495.  
  1496.   cp $ac_given_srcdir/$ac_file.in conftest.h1
  1497.   cp conftest.sed conftest.stm
  1498.   while :
  1499.   do
  1500.     ac_lines=`grep -c . conftest.stm`
  1501.     if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1502.     rm -f conftest.s1 conftest.s2 conftest.h2
  1503.     sed ${ac_max_sed_lines}q conftest.stm > conftest.s1 # Like head -20.
  1504.     sed 1,${ac_max_sed_lines}d conftest.stm > conftest.s2 # Like tail +21.
  1505.     sed -f conftest.s1 < conftest.h1 > conftest.h2
  1506.     rm -f conftest.s1 conftest.h1 conftest.stm
  1507.     mv conftest.h2 conftest.h1
  1508.     mv conftest.s2 conftest.stm
  1509.   done
  1510.   rm -f conftest.stm conftest.h
  1511.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  1512.   cat conftest.h1 >> conftest.h
  1513.   rm -f conftest.h1
  1514.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  1515.     # The file exists and we would not be changing it.
  1516.     echo "$ac_file is unchanged"
  1517.     rm -f conftest.h
  1518.   else
  1519.     rm -f $ac_file
  1520.     mv conftest.h $ac_file
  1521.   fi
  1522. fi; done
  1523. rm -f conftest.sed
  1524.  
  1525.  
  1526.  
  1527. exit 0
  1528. EOF
  1529. chmod +x config.status
  1530. # Some shells look in PATH for config.status without the "./".
  1531. test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} ./config.status
  1532.  
  1533.